package com.example.mapper;

import com.example.pojo.ConditionsQuery;
import com.example.pojo.Drug;
import com.example.pojo.DrugVo;
import com.example.pojo.Sale;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public interface MedicalMapper {


    List<DrugVo> getList(@Param("cq") ConditionsQuery conditionsQuery);

    List<Sale> getSaleLocations(Integer drug_id);

    List<Sale> getSaleList();

    Drug getDrugByName(@Param("name") String drug_name);

    int insertDrugSale(@Param("drugId") Integer drug_id, @Param("saleId") Integer saleid);

    int insert(Drug drug);

    int getDrugSaleById(@Param("id") Integer drug_id);

    int delAllDataFromDrugSaleById(@Param("id")Integer drug_id);


    int updateDrug(@Param("d")Drug drug);

    int delDrugById(@Param("id") int parseInt);

    int delBatch(@Param("ids") List<Integer> idList);
}
